<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>
  <div id="app">
    =={{msg}}
    <hr />
   水果店 <br>
   苹果 10元 /斤 折扣 8 <br>
   买多少斤:<input type="text" v-model.number="count"> <br>
   <button @click="sum">结算</button> <br>
   总价  {{ss}} 元   折扣 后  {{ss*0.8}}  元   省了   {{ss*0.2}}  元
  </div>
  <script src="https://cdn.bootcdn.net/ajax/libs/vue/2.7.14/vue.min.js"></script>
  <script>
    var vm = new Vue({
      el: "#app",
      data: {
        msg: 'hello  vue',
        count:1,
        ss:''
      },
      methods:{
        sum(){
          this.ss= this.count * 10
        }
      }
    })

    // console.log(vm, 2222);
  </script>
</body>

</html>